package com.hyzx.qbasic.admin.domain.dao;


import com.hyzx.qbasic.admin.model.po.AdminUserInfoPO;
import com.hyzx.qbasic.admin.model.po.AdminUserPO;
import com.hyzx.qbasic.admin.model.po.AdminUserTokenPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by 黄江华 on 2017/9/21.
 */
public interface AdminUserMapper {

    AdminUserInfoPO getUserInfoById(@Param("userId") int userId);

    AdminUserInfoPO getUserInfoByName(@Param("userName") String userName);

    AdminUserTokenPO getUserToken(@Param("userName") String userName);

    AdminUserPO getFullUserInfo(@Param("userName") String userName);

    List<AdminUserInfoPO> getPagedUserList(@Param("userName") String userName,@Param("roleId") Integer roleId);

    int addUser(AdminUserPO user);

    int addUserRoles(@Param("userId") int userId, @Param("roleList") List<Integer> roleList);

    int deleteUser(List<Integer> userIdList);

    int deleteUserRoles(List<Integer> userIdList);

    int editUser(AdminUserPO user);

    int resetPass(AdminUserPO user);

    List<AdminUserInfoPO> getUserListByRole(List<Integer> roleIdList);

    List<AdminUserInfoPO> getMultiUserInfo(List<Integer> userIdList);
}
